from tortoise import fields, models
class FoundEverydaySiPrice(models.Model):
    id = fields.BigIntField(pk=True)
    record_status = fields.IntField(default=1, description="记录状态:1-有效;0-无效")
    create_time = fields.DatetimeField(auto_now_add=True, description="记录创建时间")
    update_time = fields.DatetimeField(auto_now=True, description="记录修改时间")
    found_code = fields.CharField(max_length=50, default='', description="基金编码")
    found_name = fields.CharField(max_length=200, default='', description="基金名称")
    base_date = fields.DateField(null=True, description="日期")
    base_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="单位净值")
    rate = fields.DecimalField(max_digits=10, decimal_places=2, default=0.00, description="涨幅")

    min_5_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="5日最小值")
    ave_5_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="5日均值")
    max_5_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="5日最大值")

    min_10_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="10日最小值")
    ave_10_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="10日均值")
    max_10_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="10日最大值")

    min_20_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="20日最小值")
    ave_20_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="20日均值")
    max_20_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="20日最大值")

    min_30_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="30日最小值")
    ave_30_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="30日均值")
    max_30_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="30日最大值")

    min_60_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="60日最小值")
    ave_60_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="60日均值")
    max_60_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="60日最大值")

    min_120_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="120日最小值")
    ave_120_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="120日均值")
    max_120_si_price = fields.DecimalField(max_digits=10, decimal_places=4, default=0.0000, description="120日最大值")

    class Meta:
        table = "found_everyday_siprice"
        table_description = "基金每日净值"
